1. Field of the Invention
The present invention relates to a packetizing system for a high speed serial bus, and more particularly, to a method of automatically controlling an offset value added to a time stamp according to a transmission window value in the packetizing system for the high speed serial bus and an apparatus for transmitting a packet using the same.
2. Description of the Related Art
In general, a time stamp is temporal information that indicates when video and audio data must be decoded and reproduced at every unit of decoding and reproduction referred to as the access unit of video and audio data.
When real time data is transmitted on a high speed serial bus, such as the IEEE-1394 bus, a packetizing apparatus segments a source transmission stream, inserts a time stamp into the segmented source transmission streams, and outputs packet data. At this time, the packet output time is determined by the time stamp.
FIG. 1 is a block diagram showing an apparatus for setting an offset of the time stamp in a conventional packetizing system for a high speed serial bus.
A timer 110 generates a unique cycle time value related to a contact device. The cycle starts every 125 xcexcsec. An offset generator 120 generates an offset value depending on a data delay time and an amount of jitter, which is set to be a certain value by a user.
An adder 116 adds the timer value generated by the timer 110 to the offset value generated by the offset generator 120 and thus, generates the time stamp. A controller (not shown) inserts the time stamp into the data stored in a memory 130 and outputs the data to a transmitter 140. The transmitter 140 transmits data in units of packets to a receiver regardless of the time stamp.
In the conventional packetizing system, an application engineer sets an appropriate offset value and adds the offset value to the time stamp.
However, when the offset value added to the time stamp is not correct, there is an overflow in the memory 130 due to read and write timing errors. Accordingly, some data items may be lost or corrupted.
To solve the above problem, it is an object of the present invention to provide a method for controlling the offset of a time stamp, which is capable of effectively using bus bandwidth by automatically setting the offset value added to the time stamp in a packetizing system for a high speed serial bus.
It is another object of the present invention to provide an apparatus for transmitting a packet, to which the method for controlling the offset of the time stamp is applied.
To achieve the first object, there is provided an apparatus for transmitting a packet in a packetizing system for a high speed serial bus, comprising an adder for generating a time stamp value by adding a cycle time value which is a data segmentation size to an offset value in consideration of data delay time and/or the amount of jitter, a memory for storing the input data according to the time stamp in units of packets, a window generator for estimating the time stamp value generated by the adder and determining a transmission time range, and a controller for adding the time stamp generated by the adder to the data in units of packets, which are stored in the memory, outputting the data in units of packets, to which the time stamp is added, and controlling the offset value when overflow generated by read and write timing errors is detected in the memory.
To achieve the second object, there is provided a method for controlling the offset of a time stamp in a packetizing system for a high speed serial bus, comprising the steps of (a) setting a time stamp that is a unit of decoding and reproduction by adding an offset value in consideration of data delay time and the amount of jitter to packet data, (b) sequentially outputting data in units of packets according to the time stamp set in the step (a), (c) determining the range of time, at which data is to be transmitted, by estimating a time stamp in the data in units of packets, which are output in the step (b), and transmitting data in units of packets within the range, and (d) reducing or increasing the offset value when overflow is detected due to read and write timing errors when the data is transmitted in the step (c).